import request from '@/utils/request'

export function addCourseInfo(courseInfo) {
    return request({
      url: `/eduService/edu-course/addCourseInfo`,
      method: 'post',
      data: courseInfo
    })
  }

  //根据课程id查询课程信息
  export function getCourseInfo(courseId) {
    return request({
      url: `/eduService/edu-course/getCourseInfo/${courseId}`,
      method: 'get'
    })
  }


  //修改课程信息
  export function updateCourseInfo(courseInfo) {
    return request({
      url: `/eduService/edu-course/updateCourseInfo`,
      method: 'post',
      data: courseInfo
    })
  }

   //修改课程信息
   export function getPublishCourseInfo(id) {
    return request({
      url: `/eduService/edu-course/getPublishCourseInfo/${id}`,
      method: 'get'
    })
  }

  //最终发布  
  export function publihCourse(id) {
    return request({
      url: `/eduService/edu-course/publishCourse/${id}`,
      method: 'post'
    })
  }


  //课程列表
  export function getListCourse(current,limit,courseQuery) {
    return request({
      url: `/eduService/edu-course/list/${current}/${limit}`,
      method: 'post',
      data:courseQuery
    })
  }